package example;

import annotation.InitialState;
import annotation.StateMachine;
import annotation.Transition;
import example.events.GreenLight;
import example.events.RedLight;

@StateMachine
public class Car {

    public final static String STOPPED = "STOPPED";
    public static final String STARTED = "STARTED";
    private String brand;

    @InitialState(STOPPED)
    public Car(){

    }

    @InitialState(STOPPED)
    public Car(String brand){
        this.brand = brand;
    }

    @Transition(from= STOPPED, to=STARTED,event = GreenLight.class)
    public void start(){
    }
    
    @Transition(from= STOPPED, to=STARTED,event = GreenLight.class)
    public void start(Object event){
    	System.out.println("Event : " + event);
    }

    @Transition(from=STARTED,to=STARTED)
    public void accelerate(){

    }

    @Transition(from=STARTED,to= STOPPED,event = RedLight.class)
    public void stop(){

    }

    public void brake(){
        
    }
}
